#include "MiddleScene.h"
#include "ShareComponents.h"
#include"FWGraphic.h"

MiddleScene::MiddleScene(FWGame* scene):FWGame(scene)
{
	id_scene =MIDDEL_SCENE;
}


MiddleScene::~MiddleScene(void)
{
}
void MiddleScene::load()
{
	_isrender =false;
	delay =0;
	delay2=0;
}
void MiddleScene::update(float time)
{
	delay+=time;
	delay2+=time;
	_isrender = false;
		if (delay > 200)
		{
			delay = 0;
			_isrender = true;
		}
		if(delay2>3000) 
			{
				delay2=0;
				id_next_scene = MAINGAME;
				return;
			}
}
void MiddleScene::render()
{
	gl_graphic->sDraw("1P\nRECT   3\n\n\n              HI",D3DXVECTOR2(40,63),D3DCOLOR_XRGB(188,188,188));
	gl_graphic->sDraw("STAGE 1\nJUNGLE",D3DXVECTOR2(240,260),D3DCOLOR_XRGB(188,188,188));
	if(_isrender)
	{
		gl_graphic->sDraw("0",D3DXVECTOR2(220,65),D3DCOLOR_XRGB(188,188,188));
		gl_graphic->sDraw("2000",D3DXVECTOR2(300,145),D3DCOLOR_XRGB(188,188,188));
	}

}
void MiddleScene::shutdown()
{
}